package com.uni.crawl.common.util.crawl;

import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.RandomUtil;

import java.util.List;

public class UserAgentUtil {

    private static final List<String> UA = CollUtil.newArrayList(
            "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.94 Safari/537.36",
            "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0"
    );

    public static String randUA() {
        int idx = RandomUtil.randomInt(UA.size());
        return UA.get(idx);
    }

}
